import { EffectBase } from "../effect/EffectBase";
import { EffectCreator } from "../effect/EffectCreator";
import { BattleRole } from "../role/BattleRole";
import { TriggerType } from "../trigger/const/TriggerType";
import { BuffData } from "./const/BuffData";

/**
 * buff基类（buff也是一个触发器）
 */
export class BuffBase {

    buffData: BuffData

    effects: EffectBase[];

    duation: number;

    constructor(buffData: BuffData) {
        this.buffData = buffData
        this.effects = []
        let effectDatas = buffData.effectDatas;
        for (let one of effectDatas) {
            let effect = EffectCreator.create(one)
            this.effects.push(effect)
        }
        this.duation = buffData.maxCount
    }

    excute(args: any) {

    }

    get triggerType() {
        return this.buffData.triggerType
    }

    onRemove() {

    }
}